/**
 * 游戏配置类
 */
export default class GameConfig {
   // 画布尺寸
   static CANVAS_WIDTH = 600;
   static CANVAS_HEIGHT = 600;
   
   // 网格大小
   static GRID_SIZE = 20;
   
   // 游戏速度
   static GAME_SPEED = 150;
   
   // 布局相关
   static LAYOUT = {
       SCORE_PANEL: {
           HEIGHT: 45,           // 分数面板高度
           PADDING: 8,          // 分数面板内边距
           TOP_MARGIN: 8        // 分数面板顶部边距
       },
       GAME_AREA: {
           PADDING: 40,         // 游戏区域内边距
           TOP_MARGIN: 65       // 游戏区域顶部边距（需要大于 SCORE_PANEL.HEIGHT + SCORE_PANEL.TOP_MARGIN）
       }
   };

  // 颜色配置
  static COLORS = {
      BACKGROUND: '#1a1a1a',
      SNAKE_HEAD: '#4CAF50',
      SNAKE_BODY: '#45a049',
      FOOD: '#ff0000',
      GRID: '#2a2a2a',
      SCORE_PANEL: {
          BACKGROUND_TOP: 'rgba(35, 35, 35, 0.95)',
          BACKGROUND_BOTTOM: 'rgba(50, 50, 50, 0.95)',
          BORDER_TOP: 'rgba(255, 255, 255, 0.1)',
          BORDER_BOTTOM: 'rgba(255, 255, 255, 0.05)',
          TEXT: 'rgba(255, 255, 255, 0.7)',
          SCORE: {
              GRADIENT_START: '#4CAF50',
              GRADIENT_MIDDLE: '#81C784',
              GRADIENT_END: '#4CAF50'
          }
      }
  };

  static STATES = {
      LOADING: 'loading',
      MENU: 'menu',
      PLAYING: 'playing',
      PAUSED: 'paused',
      GAME_OVER: 'gameOver'
  };

  static IMAGES = {
      FOOD: 'images/food.png',
      SNAKE_HEAD: 'images/snake-head.png',
      SNAKE_BODY: 'images/snake-body.png'
  };
}